package com.cskaoyan.javase.oop2._0encapsulate._1basic;

/**
 * 静态成员变量一般不用Getter/Setter方法
 * 如果需要的话，就用static方法
 * @since 09:11
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        System.out.println(A.getNum());
        A.setNum(100);
        System.out.println(A.getNum());
    }
}

class A {
    private static int num;

    public static int getNum() {
        return num;
    }

    public static void setNum(int num) {
        A.num = num;
    }
}
